﻿using Application.AppService.MCAppService;
using AutoMapper;
using Domain;
using Domain.Entity;
using Microsoft.AspNetCore.Mvc;

namespace UI.Controllers.Transfer_management_调动管理_
{
	public class ReviewMCController : Controller
	{
		private readonly IMCAppService mCAppService;
		private readonly IMapper mapper;

		public ReviewMCController(IMCAppService mCAppService, IMapper mapper)
        {
			this.mCAppService = mCAppService;
			this.mapper = mapper;
		}
        public IActionResult Index()
		{
			return View();
		}
		public IActionResult Index1()
		{
			return View();
		}
		public IActionResult MCFYByCheckReason(string checkReason, int page, int pageSize)
		{
			MCFenYe mCFenYe = mCAppService.GetMcByCheckReason(checkReason, page, pageSize);
			return Json(mCFenYe);
		}
		public async Task<IActionResult> UpdateReviewMC(MCUpdateReviewDto mCUpdateReviewDto)
		{
			MC mC = mapper.Map<MC>(mCUpdateReviewDto);
			bool i = await mCAppService.UpdateReviewMC(mC);
			return Json(i);
		}
	}
}
